#import "DuskJoyousController.h"
        
#import "DuskJoyousModel.h"
#import "DuskJoyousCell.h"
#import "Masonry.h"

@interface DuskJoyousController () <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, strong) UITableView *silhouetteIdealTableView;
@property (nonatomic, strong) NSMutableArray *curiosityUpliftDatas;

@end

@implementation DuskJoyousController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
}

- (void)viewDidLoad {
    [super viewDidLoad];

    [self noodleBraveJoyousSetuplayout];
	[self elevategetData];
}


//: 初始化页面UI
- (void)noodleBraveJoyousSetuplayout {

	[self.view addSubview:self.silhouetteIdealTableView];
	[self.silhouetteIdealTableView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.leading.trailing.equalTo(self.view);
		make.top.equalTo(self.view);
		make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
	}];
}


//: 懒加载数据模型数组
- (NSMutableArray *)curiosityUpliftDatas {
	if (!_curiosityUpliftDatas) {
		_curiosityUpliftDatas = [NSMutableArray array];
	}
	return _curiosityUpliftDatas;
}

- (UITableView *)figHandleTableView {
    if (!_silhouetteIdealTableView) {
        _silhouetteIdealTableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain];
        _silhouetteIdealTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight;
        _silhouetteIdealTableView.estimatedRowHeight = 0;
        _silhouetteIdealTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
        _silhouetteIdealTableView.contentInset = UIEdgeInsetsMake(16, 0, 16, 0);
        _silhouetteIdealTableView.delegate = self;
        _silhouetteIdealTableView.dataSource = self;
        _silhouetteIdealTableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
        _silhouetteIdealTableView.showsVerticalScrollIndicator = NO;
        _silhouetteIdealTableView.showsHorizontalScrollIndicator = NO;
        _silhouetteIdealTableView.backgroundColor = UIColor.clearColor;
    }
    return _silhouetteIdealTableView;
}

//: 获取数据模型
- (void)elevategetData {
	
}

#pragma mark - UITableView DataSource 
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.curiosityUpliftDatas.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    DuskJoyousCell *universe = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([DuskJoyousCell class])];
    if (universe == nil) {
        universe = [[DuskJoyousCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:NSStringFromClass([DuskJoyousCell class])];
    }
    universe.selectionStyle = UITableViewCellSelectionStyleNone;
    
    return universe;
}


#pragma mark - UITableView Delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    // cell tap action
}


@end
